#include "sis3100_dma.h"

int vme_A16DMA_D32FIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
			    u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
{
  struct sis1100_vme_block_req block_req;
  int r;

  block_req.num=req_num_of_lwords   ; /*  */
  block_req.fifo=1;
  block_req.size=4;
  //   block_req.am=0x9;
  block_req.am=0x29;
  block_req.addr=vme_adr;
  block_req.data = (u_int8_t*)vme_data ;
  if( (r=ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)) < 0 )
      return -1; /* NEW */
  *got_num_of_lwords = block_req.num;
  return block_req.error ;            /* NEW */
}
